using System.Collections.Generic;

public class Table_StoryGuideItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 剧情对话内容ID
    /// <summary>
    public int StoryContentId { get; private set; }
    /// <summary>
    /// 剧情人物资源路径
    /// <summary>
    public string StoryRes { get; private set; }
    /// <summary>
    /// 剧情人物资源名称
    /// <summary>
    public string StoryImgName { get; private set; }
    /// <summary>
    /// 后续剧情ID
    /// <summary>
    public int NextStoryId { get; private set; }
    /// <summary>
    /// 音效ID
    /// <summary>
    public int SoundId { get; private set; }

    public Table_StoryGuideItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        StoryContentId = reader.ReadInt();
        StoryRes = reader.ReadString();
        StoryImgName = reader.ReadString();
        NextStoryId = reader.ReadInt();
        SoundId = reader.ReadInt();
    }
}

public class Table_StoryGuideMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/StoryGuide.txt"; } }

    protected List<Table_StoryGuideItem> mItemList = new List<Table_StoryGuideItem>();
    public Table_StoryGuideItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_StoryGuideItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_StoryGuideItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}